package cn.wen.yinxiu.member.service;

import cn.wen.yinxiu.member.vo.ChatRecordInfo;
import cn.wen.yinxiu.member.vo.ChatRecordVO;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.wen.yinxiu.common.toolkit.PageUtils;
import cn.wen.yinxiu.member.entity.ChatRecordEntity;

import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @ClassName: ChatRecordService
 * @Author 小飞
 * @Email coderwen22@163.com
 * @Date 2023-05-21 22:19:26
 * @Description:
 */
public interface ChatRecordService extends IService<ChatRecordEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 添加聊天记录
     * @param chatRecord
     */
    void appendChatRecord(ChatRecordEntity chatRecord);

    /**
     * 获取私聊聊天记录
     * @param talkId
     * @param userId
     * @param page
     * @return
     */
    List<ChatRecordEntity> queryUserChatRecordList(Long talkId, Long userId, Integer page);

    /**
     * 获取组聊天记录
     * @param talkId
     * @param page
     * @return
     */
    List<ChatRecordEntity> queryGroupsChatRecordList(Long talkId, Integer page);

    /**
     * 获取聊天记录
     *
     * @param talkId [群组ID 或者 用户对方ID]
     * @param userId
     * @param talkType
     * @param page
     * @return
     */
    List<ChatRecordVO> queryChatRecordVOList(Long talkId, Long userId, Integer talkType, Integer page);
}

